package com.xyongfeng.foodManagement.controller;


import com.xyongfeng.foodManagement.common.BaseResponse;
import com.xyongfeng.foodManagement.common.ResultUtils;
import com.xyongfeng.foodManagement.domain.FoodInInfo;
import com.xyongfeng.foodManagement.domain.Permission;
import com.xyongfeng.foodManagement.domain.group.AddGroup;
import com.xyongfeng.foodManagement.domain.group.NormalGroup;
import com.xyongfeng.foodManagement.service.AdminInfoService;
import com.xyongfeng.foodManagement.service.FoodInInfoService;
import com.xyongfeng.foodManagement.service.PermissionService;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 权限
 *
 * @author xyongfeng
 */
@RestController
@RequestMapping("/permission")
@Slf4j
public class PermissionController {

    @Autowired
    private PermissionService permissionService;


    @GetMapping
    public BaseResponse<List<Permission>> selectAll() {
        return ResultUtils.success(permissionService.list());
    }

}
